<?php
header('Content-Type:application/json;charset=utf-8');
$raw=file_get_contents('php://input');
$raw=json_decode($raw,true);
$user=$raw['user'];
$pass=$raw['pass'];

//配置管理账号！
$glzh='admin';
$glmm='admin';

if ( $user == '' ){
    $arr=array('msg'=>'失败','content'=>'请输入账号！');
    echo json_encode($arr,JSON_UNESCAPED_UNICODE);
}elseif ( $pass == '' ) {
    $arr=array('msg'=>'失败','content'=>'请输入密码！');
    echo json_encode($arr,JSON_UNESCAPED_UNICODE);
}else{
    if ( $user == $glzh && $pass == $glmm ) {
        $arr=array('msg'=>'成功','content'=>'欢迎管理员进入！');
        echo json_encode($arr,JSON_UNESCAPED_UNICODE);
    }else{
        $arr=array('msg'=>'失败','content'=>'账号或密码错误！');
        echo json_encode($arr,JSON_UNESCAPED_UNICODE);
    }
}